package com.example.Extension.Event;

import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

/**
 * @Description TODO
 * @Date 2024/6/3 13:27
 * @Created by houjunfeng
 */
@Component
public class Listener {
    @EventListener(MyEvent.class)
    public void listener(MyEvent myEvent){
        System.out.println("监听器监听事件："+myEvent.getColor());
    }
}
